#ifndef ACAPELLA_WORKER_TASK_WORKER_HPP
#define ACAPELLA_WORKER_TASK_WORKER_HPP

#include "worker_base.hpp"


namespace acapella
{
namespace worker
{

template<
    typename FunctorType, 
    typename BindType = acapella::delegate::dynamic_bind, 
    typename ClassType = acapella::delegate::ClassStub
    >
class TaskWorker : public worker<FunctorType, BindType, ClassType>
{
public:
    typedef worker<FunctorType, BindType, ClassType> parent;
    typedef typename parent::functor_type functor_type; 


    TaskWorker(functor_type _functor)
        :parent(_functor)
    {
    }

protected:
    void _Schedule(typename parent::task_pointer_type pTask)
    {
        pTask->run();
    }
};



}
}


#endif
